/**
 * Copyright (C), 2020, XXX有限公司
 * FileName: CuUserDetails
 * Author:   Administrator
 * Date:     2020/5/9 14:56
 * Description:
 * History:
 * <author>          <time>          <version>          <desc>
 * 作者姓名           修改时间           版本号              描述
 */
package com.fmyexample.v2mcsecuritybootjdbc.sucerity;

import com.fmy.mcsecurity.login.service.McUserDetails;
import com.fmyexample.v2mcsecuritybootjdbc.modular.model.User;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * 〈获取用户信息〉<br>
 * 〈〉
 *
 * @author Administrator
 * @create 2020/5/9
 * @since 1.0.0
 */
public class CuUserDetails extends User implements McUserDetails {

    @Override
    public String userId() {
        return super.getUserId();
    }

    @Override
    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    @Override
    public String getUsername() {
        return super.getUserPhone();
    }

    @Override
    public boolean isAccountNonExpired() {
        return true;
    }

    @Override
    public boolean isAccountNonLocked() {
        return true;
    }

    @Override
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @Override
    public boolean isEnabled() {
        return true;
    }
}